<?php

//error_reporting(!E_NOTICE);
define('BASE_URL', 'http://' . @$_SERVER['SERVER_NAME']);
// define these global path constants here
define('ROOT_PATH', dirname(dirname(__FILE__)));
define('BASE_PATH', realpath(dirname(__FILE__) . '/..'));
define('LIB_PATH', ROOT_PATH . '/library');
define('APPLICATION_PATH', ROOT_PATH . '/application');
define('MODULE_PATH', ROOT_PATH . '/application/modules');

// define the path for config.ini
define('CONFIG_PATH', ROOT_PATH . '/application/configs');
define('SETLANGUAGE', 'es_ES');

// Define application environment
defined('APPLICATION_ENV')
    || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));

// set the php include path
set_include_path(
        LIB_PATH . PATH_SEPARATOR .
        get_include_path()
);

/** Zend_Application */
require_once 'Zend/Application.php';
//require_once 'My/MyApplication.php';

// Create application, bootstrap, and run
$application = new Zend_Application(
                APPLICATION_ENV,
                CONFIG_PATH . '/application.ini'
);

$application->bootstrap()
            ->run();